/// <reference path="../_References.ts"/>

class Frame
{
    public static draw = function()
    {
        Game.context.clearRect(0, 0, Game.context.canvas.width, Game.context.canvas.height);
        Game.terrain.draw();
        Game.snake.draw();
        Game.powerup.draw();
        //fps.draw();

        Game.snake.move();
        //var date = new Date();
        //console.warn("sound started: " + date.getSeconds() + "." + Game.pad(date.getMilliseconds(), 3));
        Game.sounds.snakeTickSound.play();

        setTimeout(Frame.draw, Game.speed);
    };
}